home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_01_bab_enter_archive.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  169 lines

  1. # Jones 3D Cog Script
  2. #
  3. # 01_BAB_Enter_Archive.cog
  4. #
  5. # Indy discovers the Archive room and marvels
  6. #
  7. # [HB]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ==============================================================================
  12.  
  13. symbols
  14.  
  15. # .................................. MESSAGES ..................................
  16.  
  17.     message        startup
  18.     message        entered    
  19.     
  20. # .................................. KEYFRAMES .................................
  21.     
  22.     keyframe    in_handsONhips=0in_stand4.key            local
  23.     keyframe    in_handsTOhips=0in_stand1_bd_4.key           local # 26x
  24.     keyframe    in_ltarmup=0in_leftarm_1_1.key            local
  25.     keyframe    in_botharmsup=0in_armsup_1_1.key        local
  26.         
  27. # .................................. MODELS ....................................
  28.  
  29.  
  30. # .................................. SOUNDS ....................................
  31.  
  32.     sound        in_neblibrary=Bb07j01.wav                local # "...Shh, don't disturb..."
  33.     
  34. # ............................... ACTOR THINGS .................................
  35.  
  36.     thing        player                                    local
  37.     thing        arc_indy
  38.      
  39. # .............................. OBJECT THINGS .................................
  40.  
  41.  
  42. # .............................. CAMERA THINGS .................................
  43.  
  44.     thing        arc_cam_1                                nolink
  45.         
  46.     thing        arc_ct_1                                nolink
  47.     thing        arc_ct_2                                nolink
  48.  
  49.     
  50. # .............................. TARGET THINGS .................................
  51.  
  52.     thing        arc_mk_1                                nolink
  53.     thing        arc_mk_2                                nolink
  54.  
  55. # ........................ OTHER ENGINE REFERENCES .............................
  56.  
  57.     sector        startsector
  58.  
  59.     template    ghost_tpl=ghost                            local
  60.     
  61. # ............................... VARIABLES ....................................
  62.     
  63.     vector        v_targetpos                                local
  64.  
  65.     int            cutSceneState=0                            local
  66.  
  67.     int            in_keyTrack1                            local
  68.  
  69.     int            cursound                                local
  70.     int            curcam                                    local
  71.     
  72. end
  73.  
  74. # ==============================================================================
  75.  
  76. code
  77.  
  78. # ..............................................................................
  79.  
  80. startup:
  81.  
  82.     # Prepare for much later...
  83.     SetThingFlags(arc_indy, 0x80000);
  84.     cutSceneState = 0;
  85.  
  86.     return;
  87.  
  88. # ..............................................................................
  89.  
  90. entered:
  91.  
  92.     if (cutSceneState != 0)
  93.     {
  94.         # Only run cutscene once...
  95.         return;
  96.     }
  97.  
  98.     # Prep engine...
  99.     player = GetLocalPlayerThing();
  100.     SetActorFlags(player, 0x200000);
  101.     cutSceneState = 1;
  102.     MakeMeStop();
  103.     DeselectWeaponWait(player);
  104.     StartCutScene(1);
  105.  
  106.     # Cut to shot of archive entrance...
  107.     curcam = GetCurrentCamera();
  108.     SetCameraLookInterp(2, 0);
  109.     SetCameraPosInterp(2, 0);
  110.     SetCameraFocus(2, arc_cam_1);
  111.     SetCAmeraSecondaryFocus(2, arc_ct_1);
  112.     SetCurrentCamera(2);
  113.     SetCameraFOV(30, 0, 0.0);
  114.     
  115.     # Set up Indy...
  116.     ClearThingFlags(arc_indy, 0x80000);
  117.     SetThingFlags(player, 0x80000);
  118.     CopyPlayerHolsters(player, arc_indy);
  119.  
  120.     # Indy walks to entrance...
  121.     AISetMoveSpeed(arc_indy, 0.9);
  122.     AISetLookThingEyeLevel(arc_indy, arc_mk_1);
  123.     AISetMoveThing(arc_indy, arc_mk_1, 1);
  124.     
  125.     # Indy: "Okay...Nebuchadnezzar's library, maybe...dead for thousands of years."
  126.     cursound = PlayVoice(arc_indy, in_neblibrary, 1.0, 0); # 9.7 sec
  127.     AISetLookThing(arc_indy, arc_mk_2);
  128.     SetCameraLookInterp(2, 1); # prep cam
  129.     Sleep(0.5);
  130.     in_keyTrack1 = PlayKey(arc_indy, in_handsONhips, 2, 0x10, 0);
  131.     PlayKey(arc_indy, in_handsTOhips, 4, 0x12, 1);
  132.  
  133.     # Pan over to take in entire archive...
  134.     SetCameraInterpSpeed(2, 6.0);
  135.     SetCameraSecondaryFocus(2, arc_ct_2);
  136.     SetCameraFOV(100, 1, 6.0);
  137.     Sleep(5.0);
  138.  
  139.     # Indy gestures...
  140.     StopKey(arc_indy, in_keyTrack1, 0.5);
  141.     Sleep(0.5);
  142.     PlayKey(arc_indy, in_botharmsup, 4, 0x12, 1);
  143.     WaitForSound(cursound);
  144.     AISetLookThingEyeLevel(arc_indy, arc_ct_1);
  145.     Sleep(0.5);
  146.  
  147.     # Clean up...
  148.     SetCameraLookInterp(2, 0);
  149.     SetCameraPosInterp(2, 0);
  150.     ClearThingFlags(player, 0x80000);
  151.     TeleportThing(player, arc_indy);
  152.     SetThingFlags(arc_indy, 0x80000);
  153.     
  154.     # Establish a camera position near Indy and prep follow-cam...            
  155.     v_targetpos =
  156.         VectorAdd(VectorTransformToOrient(player, '-0.05 -0.2 0.0'), GetThingPos(player));    
  157.     SetCameraPosition(1, v_targetpos);
  158.     
  159.     SetCurrentCamera(curcam);
  160.     ResetCameraFOV(0, 0.0);
  161.  
  162.     # Restore control...
  163.     EndCutScene();
  164.     ClearActorFlags(player, 0x200000);
  165.  
  166.     return;
  167.  
  168. end
  169.